package com.booktrade.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 评价表，存储用户对交易的评价信息
 * </p>
 */
@Getter
@Setter
public class Reviews implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 评价ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单ID，关联到订单表
     */
    private Integer orderId;

    /**
     * 评价者ID，关联到用户表
     */
    private Integer reviewerId;

    /**
     * 评价等级
     */
    private String rating;

    /**
     * 评价分数：好评加一分，中评零分，差评扣一分
     */
    private Integer score;

    /**
     * 评价内容
     */
    private String comment;

    /**
     * 评价时间
     */
    private LocalDateTime createdAt;
}
